local function main(userOb, msgData)
    if not msgData.GoodFriendId then
        return
    end 
    local userId = userOb:query_temp("userId")
    local res = userOb:change_todo_friend(userId,msgData.GoodFriendId,2)
    local result = {}
    if res then
        result.code = 200
        result.status = "success"
    else
        result.code = 400
        result.status = "fail"
    end    
    userOb:send_packet("MSGS2CGoodFriendFAIL", result)  
end

--注册方法
COMMAND_D:register_command("MSGC2SGoodFriendFAIL",GameCmdType.NONE, main)